package cn.com.sports.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.com.sports.dao.UserMapper;
import cn.com.sports.model.User;
import cn.com.sports.service.UserService;

@Service("userService")
public class UserServiceImpl implements UserService{
	@Autowired
	private UserMapper userMapper ;

	@Override
	public User getUserById(int id) {
		return userMapper.selectByPrimaryKey(id);
	}

	@Override
	public List<User> getAllUser() {
		return userMapper.getAllUser();
	}

	@Override
	public int saveUser(User user) {
		return userMapper.saveUser(user);
	}

	@Override
	public int delUserById(int id) {
		return userMapper.delUserById(id);
	}

	@Override
	public int editUser(User user) {
		// TODO Auto-generated method stub
		return userMapper.editUser(user);
	}
	
}
